﻿<?php
include("../public_files/conn.php");

session_start();
$sort_id=1;
?>  


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=EmulateIE7" http-equiv="X-UA-Compatible"/>
<meta name="keywords" content=""/><!--SEO关键字-->
<meta name="description" content=""/><!--SEO描述-->
<link rel ="" href=""/><!--选项卡图标-->
<title></title>
<link rel="stylesheet" href="../css/base.css"/>
<link rel="stylesheet" href="../css/all_header.css"/>
<link rel="stylesheet" href="../css/music_home.css"/>
<link rel="stylesheet" href="../css/16sucai_css.css" type="text/css" media="screen" charset="utf-8">
<script type="text/javascript" src="../js/check.js"></script>
<script type="text/javascript" src="../js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../js/music.js"></script>
<script type="text/javascript" src="../js/all_header.js"></script>
<script src="../js/jquery-1.3.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/slider.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="../js/music_home.js"></script>
<script type="text/javascript" src="../js/search.js"></script>
<!--[if lt IE 9]>
<script src="../js/html5shiv.js"></script>
<![endif]-->
<!--[if ie 6]>
<link rel="stylesheet" href="../css/ie6.css">
<script type="text/javascript" src="../js/DD_belatedPNG.js" ></script>
<script type="text/javascript">
DD_belatedPNG.fix('.png');/*在需要png透明的元素里面加上.png样式即可（class="png"）*/
</script>
<![endif]-->
</head>
<body>				<!--滑动注册登录框-->
	<div class="slide_box">
		<div class="slide_login">
				<span>邮箱:</span><br/>
				<input type="text" id="email"  onblur="cheak_email(this)" class="required" value="" style="width:219px;height:29px;border:0px;background:#333;color:#ddd;"/>
					<br/><br/>
				<span>密码:</span><br/>
				<input type="password"  value="" id="password"  style="width:219px;height:29px;border:0px;background:#333;color:#ddd;"/>
				<div class="text1">
					<div class="text2"><span>还没账号？</span><span onclick="show_regesit();">注册<span></div>
				<div class="login_btn"><input type="button" onclick="login(),cheak_email('#email') "name="submit" id="send" value="登录" style="width:70px;height:29px;background:#333;border:0px;color:#999;"></div>
				</div>
			
		</div>
		
		<div class="slide_regesit">
				<span>昵称:</span><br/>
				<input type="text" id="Username" name="username" value="" style="width:219px;height:29px;border:0px;background:#333;color:#ddd;"/>
					<label class="stats1">请输入用户名</label><br/>
				<br/><span>邮箱:</span><br/>
				<input type="text"name="email" id="Email" value="" style="width:219px;height:29px;border:0px;background:#333;color:#ddd;"/>
					<label class="stats1">请输入邮箱</label><br/>
				<br/><span>密码:</span><br/>
				<input type="password"id="Password" name="password" value="" style="width:219px;height:29px;border:0px;background:#333;color:#ddd;"/>
				<label class="stats1">请输入用户密码</label>
				<div class="text1">
					<div class="text2"><input type="checkbox" name="agreement" id="agreement"/><a>&nbsp;同意服务条款</a><br/><label>&nbsp;请阅读并同意服务条款</label></div>
					<div class="reg_btn"><input type="button"name="sub" onclick="regs('click'),register()" value="注册" style="width:70px;height:29px;background:#333;border:0px;color:#999;"></div>
				</div>
		</div>
	</div>
	<!--触发下拉框按钮-->
	<div class="slide_btn"  onclick="slide_btn();"><img class="png" src="../images/arrow_down.png"/></div>
	<!--主体-->
	<div class="container_12">
		<div class="header">
			<div class="logo"style="display:inline;float:left;">
				<img class="png" src="../images/TopWhole_logo.png"/>
			</div>
			<!--创建榜单按钮-->
			<div class="creat_list_btn"style="display:inline;float:left;margin:20px auto;">
				<input type="button" onclick="openNewDiv();" style="background:url(../images/creat_list_btn.png);width:140px;height:72px;border:0px;"/>
			</div>
			<div class="search">
				<div class="un_useful_4">
				<form action="search.php" method="post" id="search_start">
					<input type="text" id="search_box" name="search" value="" onblur="hide_result()" oninput="cheak(this)" style="width:193px;height:25px;"/>
					
					<a href="#"><input type="submit" id="Submit" name="submit" style="background:url(../images/search_btn.png);width:17px;height:17px;border:0px;" value=""/></a>
				</form>
				</div>
				<div class="l_r_text">
				<?php if(isset($_SESSION['username'])){
				echo '<div class="un_useful_5">
						<span class="log_tetx" > <a href="../person/complete_list.php">'.$_SESSION['username'].'</a></span>
					</div>
					<div class="un_useful_6">
						<span class="un_useful_7"> | </span>
						<span class="reg_text" onclick="destroy()">退出</span>
					</div>';
				}else{ ?>
								<div class="un_useful_5">
						<span class="log_tetx" onclick="slide_btn();"> 登录 </span>
					</div>
					<div class="un_useful_6">
						<span class="un_useful_7"> | </span>
						<span class="reg_text" onclick="regesit_btn();"> 注册 </span>
					</div>
			<?php } ?>

				</div>
				<!--个人信息-->
				<div class="person_info">
					<div class="un_useful_61">
						<img style="width:48;height:48px;"src="../images/p3.gif">
					</div>
					<div class="un_useful_51"><a href="#">用户名用户名用户</a></div>
				</div>
				<div class="search_result"></div>
			</div>
			<div class="nav">
				<ul>
					<li class="index"><a href="index.php" >主页</a></li>
					<li class="music"><a href="music_home.php">音乐</a></li>
					<li class="movie"><a href="movie_home.php">影视</a></li>
					<li class="sport"><a href="sport_home.php">运动</a></li>
					<li class="funny"><a href="funny_home.php">趣味</a></li>
					<li class="people"><a href="people_home.php">人物</a></li>
					<li class="travel"><a href="travel_home.php">旅游</a></li>
					<li class="book"><a href="book_home.php">书籍</a></li>
					<li class="diet"><a href="diet_home.php">饮食</a></li>
					<li class="science"><a href="science_home.php">科技</a></li>
					<li class="other"><a href="other.php">其它</a></li>
				</ul>
			</div>
		</div>
		<div style="clear:both;"></div>
	</div>
	
	
	
		<!--创建榜单弹出遮罩层-->
	<div id="list_name_input"style="background:url(../images/bg_body.gif);width:576px;height:258px;">
		<span style="color:blue;float:right;font:bold 15px 微软雅黑;padding:10px;cursor:pointer;"onclick="btn_close();">X</span>
		<div class="input_logo" style="background:url(../images/list_input_name.gif);width:173px;height:174px;clear:both;margin-top:50px;margin-left:30px;">
		</div>
		<div class="input_12" style="float:right;margin-top:-110px">
			<input type="text"style="background:url(../images/input.gif);width:306px;height:38px;border:0px;"/>
			<select style="width:55px;height:20px;font-size:15px;">
				<option>音乐</option>
				<option>趣味</option>
				<option>人物</option>
				<option>电影</option>
			</select><br/>
			<span style="font-size:12px;color:#838383;">你也可以稍后再填写</span>
		</div>
		<div class="next_btn"style="float:right;padding-right:58px;">
			<input type="button" value="下一步"style="font-size:15px;color:#fff;background:#43b7eb;width:79px;height:32px;border:0px;"/>
		</div>
		<div></div>
		
	</div>
	
	<!--/*滚动图片*/-->
	<div class="scroll_pic png">
		<div id="wrapper">
        <div id="slider">    
			<img class="scrollButtons left" src="../images/leftarrow.png">
			<div style="overflow: hidden;" class="scroll">
	
				<div class="scrollContainer">
	
	            <div class="panel" id="panel_1">
					<div class="inside">
							<img src="../images/p1.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
					</div>
				</div>

	                <div class="panel" id="panel_2">
						<div class="inside">
							<img src="../images/p2.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
					</div>
				
	                <div class="panel" id="panel_3">
						<div class="inside">
							<img src="../images/p3.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
					</div>
				
					
					<div class="panel" id="panel_4">
						<div class="inside">
							<img src="../images/p3.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
					</div>
					
					<div class="panel" id="panel_5">
						<div class="inside">
							<img src="../images/p2.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
					</div>
					<div class="panel" id="panel_6">
					
						<div class="inside">
							<img src="../images/p1.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
						
					</div>
					<div class="panel" id="panel_7">
						<div class="inside">
							<img src="../images/p3.gif" alt="picture" />
						<div class="char">
							<h2>News Heading</h2>
							<p>A very shot exerpt goes here... <a href="#">more link</a></p>
						</div>
						</div>
					</div>
				
                </div>

				

            </div>

			<img class="scrollButtons right" src="../images/rightarrow.png">

        </div>
        
    </div>		
	</div>
	<div class="container_12">
		<div class="music_body">
			<div class="list_menu">
				<div class="power_list_menu" OnClick="show_power_list();">
					<a class="power_list_menu_text1">权威榜单</a>
				</div>
				<div class="user_list_menu" OnClick="show_user_list();">
					<a>用户榜单</a>
				</div>
			</div>
<!--权威榜单-->		
			<div class="power_list_content">
					<?php
			$result=mysql_query("select * from official_list_name where list_sort_id='1' order by create_time") or die(mysql_error());
		while($rows= mysql_fetch_array($result)){?>
							<div class="pl_1">
					<div class="pic">
						<img src="<?php echo $rows['img_path']; ?>">
					</div>
					<div class="list_1_content">
						<?php echo "<a style='color:#444;font-size:23px;' href='MusicListContent.php?listname_id=$rows[id]&type=0&sort_id=$sort_id' onclick=add_browse_o($rows[id])>".$rows['list_name']."</a>";?><a href="#" style="color:#444;font-size:14px;">(单曲榜)</a><br/>
						<span style="color:#777;font-size:12px;">更新时间 : </span><span style="color:#777;font-size:12px;"> 每周一 12:30 a.m</span>
					</div>
				</div>
			
				<?php } ?>
			

			
			

			</div>
<!--用户榜单-->			
			<div class="user_list_content">
			<?php loading($sort_id);?>

			</div>
		</div>
		<div class="un_useful">
			<div class="list_left">
				<div class="ss" style="background:url(../images/list_right.gif);width:155px;height:39px;margin:20px -11px auto;">
						<a>全站最热榜单</a>
				</div>
				<div class="right_content_2">
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最大的女歌手</a></p>
					<p><a href="#">排名前10的女子电音</a></p>
					<p><a href="#">儿童音乐天才</a></p>
					<p><a href="#">最好的吉他的摇滚专辑</a></p>
					<p><a href="#">最好的摇滚乐器 </a></p>
					<p><a href="#">最好的吉他的摇滚专辑</a></p>
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最大的女歌手</a></p>
					<p><a href="#">排名前10的女子电音</a></p>
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最大的女歌手</a></p>
				</div>
				<!--更多按钮-->
				<p class="more_btn2" onclick="more_btn2();">更多>></p>
				<!--部分内容隐藏2-->
				<div class="more_content_2">
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最伟大的女歌手</a></p>
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最伟大的女歌手</a></p>
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最伟大的女歌手</a></p>
					<p><a href="#">在过去10年来最伟大的女歌手在过去10年来最伟大的女歌手</a></p>
				</div>
				<!--收起按钮-->
				<p class="close_btn2" OnClick="close_btn2();">收起<<</p>
			</div>
			<div class="right_shadow"><img class="png"src="../images/right_list_shadow.png"></div>
		</div>
	</div>
	<div style="display:none" id="goTopBtn"><img class="png" border=0 src="../images/go_top.png"></div>
	<script type="text/javascript">goTopEx();</script>
</body>
</html>




<?php



function loading($sort_id){
include("../public_files/fenye.php");
//////分页/////////////////////////////////////////////////////////////////////////////////////////////
				$page=isset($_GET['page'])?intval($_GET['page']):1;
				$num=10;																//每页显示条信息
				$total=mysql_num_rows(mysql_query("select * from  user_list_name where  status='0' and list_sort_id='$sort_id'")); 
				$pagenum=ceil($total/$num);					//总共有多少页
				
				If($page>$pagenum || $page == 0){
						echo "error : Can Not Found The page .";
						exit;
				}
				$offset=($page-1)*$num;				//从第几页开始从数据库取数据
				if($total<=$num){
				$num=$total;
				}
				
				$results=mysql_query("select * from user_list_name where status='0' and list_sort_id='$sort_id' order by create_time  limit $offset,$num  ");
				
///////////////////////////////////输出列表/////////////////////////////////////////
//$result=mysql_query("select * from user_list_name order by create_time") or die(mysql_error());

		while( $rows= mysql_fetch_array($results) ){
		if($rows['user_id']==0){
		$user_name="游客";
		}else{
		
		$result=mysql_query("select * from userinf where id='".$rows['user_id']."'")or die(mysql_error());
		$row=mysql_fetch_array($result);
		$user_name=$row['username'];
		}
		?>
		<div class="pl_1">
					<div class="pic">
						<img style="width:48px;height:48px;"src="<?php echo $rows['img_path']; ?>">
					</div>
					<div class="list_1_content">
						<div class="list_name">
							<?php echo "<a style='color:#444;font-size:21px;' href='MusicListContent.php?listname_id=$rows[id]&type=1&sort_id=$sort_id' onclick='add_browse_u(".$rows['id'].")'>".$rows['list_name']."</a>";?><a href="#" style="color:#444;font-size:14px;">(单曲榜)</a><br/>
						</div>
						<div class="user_name">
							<span style="color:#777;font-size:12px;">发布时间 : </span><span style="color:#777;font-size:12px;"><?php echo $rows['create_time']; ?></span>
							<span class="un_useful_2">@:</span><a href="#" ><?php echo $user_name; ?></a>
						</div>
					</div>
				</div>
		
		
		

				<?php
				
				}

				
				echo '<div class="feiye">';
				$ajax_function="ajax_muc_home";
				$type=1;
					fenyexianshi($page,$pagenum,$type,$ajax_function,$sort_id," -5","-5 ");////////////////逻辑分页、分块
				echo '</div>';
				
}


?>